import request from '@/utils/request'

// 查询打卡原始记录列表
export function listRecord(query) {
  return request({
    url: '/system/attendance/list',
    method: 'get',
    params: query
  })
}

// 查询打卡原始记录详细
export function getRecord(recordId) {
  return request({
    url: '/system/attendance/' + recordId,
    method: 'get'
  })
}

// 新增打卡原始记录
export function addRecord(data) {
  return request({
    url: '/system/attendance',
    method: 'post',
    data: data
  })
}

// 修改打卡原始记录
export function updateRecord(data) {
  return request({
    url: '/system/attendance',
    method: 'put',
    data: data
  })
}

// 删除打卡原始记录
export function delRecord(recordId) {
  return request({
    url: '/system/attendance/' + recordId,
    method: 'delete'
  })
}

// 查询统计
export function getStatisticsRecord(query) {
  return request({
    url: '/system/attendance/getStatisticsRecord',
    method: 'get',
    params: query
  })
}

export function getDeptList() {
  return request({
    url: '/system/attendance/getDeptList',
    method: 'get',
    params: null
  })
}
